Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": [ | |
"comment", | |
"comment.block", | |
"comment.block.documentation", | |
"comment.line", | |
"constant", | |
"constant.character", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure you are pulling ALL your posts from the ghost API [No limit] | |
function LatestPost (props) { | |
const [ postNum, setPostNum] = useState(3); // Default number of posts dislplayed | |
function handleClick() { | |
setPostNum(prevPostNum => prevPostNum + 3) // 3 is the number of posts you want to load per click | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you don't remember the exact path/name, search the log for deleted files | |
git log --diff-filter=D --summary | grep delete | |
# Find the file you want to get from the ouput, and use the path | |
# Find the commits that involved that path | |
git log --all -- some/path/to/deleted.file | |
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted) | |
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Fn = { | |
// Valida el rut con su cadena completa "XXXXXXXX-X" | |
validaRut : function (rutCompleto) { | |
if (!/^[0-9]+[-|‐]{1}[0-9kK]{1}$/.test( rutCompleto )) | |
return false; | |
var tmp = rutCompleto.split('-'); | |
var digv = tmp[1]; | |
var rut = tmp[0]; | |
if ( digv == 'K' ) digv = 'k' ; | |
return (Fn.dv(rut) == digv ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import soundfile as sf | |
from scipy.fftpack import fft, ifft | |
def rotateSignal(signal,flip): | |
if flip: | |
signal = signal[::-1] | |
x = np.concatenate((signal, signal[1:][::-1])) # concatenating the array with a reverse of itself makes it such that the fourier transform doesn't layer over a reversed version of itself in the inverse fft | |
rotSig = ifft(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Roblox.Hack = { | |
original: 'missingno', | |
balance: 0, | |
initialized: 0, | |
loading: false, | |
items: [], | |
inventoryString: '<li class="list-item item-card ng-scope"><div class="item-card-container"><a class="item-card-link" href="%1" data-ytta-id="-"><div class="item-card-thumb-container"><div ng-hide="item.Product.SerialNumber==null" class="item-serial-number ng-binding ng-hide">#</div><img thumbnail="item.Thumbnail" image-retry="" class="item-card-thumb ng-isolate-scope" src="%2"></div><div class="text-overflow item-card-name ng-binding" title="%6 ">%6 </div></a><!-- ngIf: item.Item.AudioUrl --><div class="text-overflow item-card-creator"><span class="xsmall text-label">By</span> <a class="xsmall text-overflow text-link ng-binding" ng-href="%3" ng-hide="assetsListContent.assetItems.data.Data.PageType!==\'favorites\'&&currentData.category.name==\'Places\'&&(currentData.subcategory.name==\'My VIP Servers\'||currentData.subcategory.name==\'Other VIP Servers\')&&staticData.isOwnPage" href="%3" |
To those with mailboxes on Dreamhost, such as on our domain cindysworld.org
, these instructions will be helpful in using your mailbox from gmail.
If you are hosted on another domain, just replace cindysworld.org
with your domain in the following instructions.
Every email user can log into https://mailboxes.dreamhost.com/ with their full email and current password. Once logged in, they can reset the password. If the user does not remember the current password, they must contact the account manager.
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -------------------------------------------------------------------------- */ | |
/* More here; */ | |
/* -------------------------------------------------------------------------- */ | |
//gist.github.com/rphlmr/0d1722a794ed5a16da0fdf6652902b15 | |
https: export function distinctOn<Column extends AnyColumn>(column: Column) { | |
return sql<Column["_"]["data"]>`distinct on (${column}) ${column}`; | |
} | |
export function jsonBuildObject<T extends SelectedFields>(shape: T) { |
NewerOlder