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 SwiftUI | |
@main | |
struct Medium: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} | |
} |
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 axios, { AxiosRequestConfig } from 'axios' | |
const domainName = 'example.com' | |
const auth = 'Bearer POT_YOUR_TOKEN_HERE'; | |
(async () => { | |
try { | |
let requestConfig: AxiosRequestConfig = { |
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
sudo killall -STOP -c usbd |
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
- ChatApplication | |
|- Documents | |
|- Doucumentations | |
|- Resources | |
|- Sources | |
|- backend | |
|- iOS |
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
#!/bin/sh | |
DIR=`date +%Y-%m-%d-%H-%M-%S` | |
DEST=/root/db_backups/$DIR | |
mkdir $DEST | |
mongodump -o $DEST | |
scp -r /root/db_backups/$DIR 7030backup:/root/mongodb_backups/$DIR |
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 Promise = require('bluebird'); | |
doTask1() | |
.then(doTask2) | |
.then(doARecursiveTask) | |
.then(doFinalTask) | |
.then(function (fullfilled) { | |
console.log('that last thing is:', fullfilled) | |
console.log('[DOOOOOOOOONEEEE]') | |
}) |
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
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
-(void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator{ | |
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; | |
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
if (size.width > size.height) { | |
[self.tableView reloadData]; | |
} | |
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
if (size.width < size.height) { | |
[self.tableView reloadData]; | |
} |
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
sudo gitlab-rails console | |
ApplicationSetting.last.update_attributes(signin_enabled: true) | |
exit | |
sudo gitlab-ctl restart |
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
<?php | |
ini_set('display_errors','On'); | |
error_reporting(E_ALL); |
NewerOlder